package com.meilai.project.constant;

import lombok.Getter;

@Getter
public enum MessageCenterTypeEnum {
    SYSTEM(1, "系统"),
    CHECK(2, "审批"),
    COPY(3, "抄送"),
    MISSION(4, "任务"),
    TIP(5, "提醒"),
    PUSH(6, "推送"),
    OTHER(7, "其他");

    private final Integer type;
    private final String name;

    public static String getName(Integer type) {
        for (MessageCenterTypeEnum o : MessageCenterTypeEnum.values()) {
            if (o.getType().equals(type)) {
                return o.name;
            }
        }
        return null;
    }

    MessageCenterTypeEnum(Integer type, String name) {
        this.type = type;
        this.name = name;
    }
}
